
export const toggleFullscreen = (element: HTMLElement) => {
    if (!document.fullscreenElement) {
      // Launch fullscreen for browsers that support it
      if (element.requestFullscreen) {
        element.requestFullscreen();
      } 
    } else {
      // Exit fullscreen for browsers that support it
      if (document.exitFullscreen) {
        document.exitFullscreen();
      }
    }
  }